package com.corechina.apex_osswords.domain.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 巡检表
 * </p>
 *
 * @author cc
 * @since 2023-03-09
 */
@Getter
@Setter
@TableName("core_polling")
@ApiModel(value = "CorePollingVo对象", description = "巡检表")
public class CorePollingVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("项目id")
    private Integer projectId;

    @ApiModelProperty("设备id列表  以逗号分隔")
    private String equipmentList;

    @ApiModelProperty("计划巡检人")
    private Integer planPerson;

    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty("开始时间")
    private LocalDate beginDate;

    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty("结束时间")
    private LocalDate endDate;

    @ApiModelProperty("巡检类型 1 year 2 month 3 week 4 day")
    private Integer type;

    @ApiModelProperty("频率")
    private Integer frequency;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mms:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("创建人id")
    private Integer creator;

    @ApiModelProperty("企业id")
    private Integer enterpriseId;

    @ApiModelProperty("创建人名称")
    private String creatorName;

    @ApiModelProperty("项目名称")
    private String projectName;

    @ApiModelProperty("计划巡检人名称")
    private String planPersonName;

    @ApiModelProperty("巡检设备")
    private String equipmentListName;

    @ApiModelProperty("巡检总数")
    private Integer planCount;

    @ApiModelProperty("已巡检数")
    private Integer finished;

    @ApiModelProperty("未巡检数")
    private Integer unfinished;

    @ApiModelProperty("异常数")
    private Integer abnormal;
}
